<?php

require_once(dirname(__FILE__) . '/../lib/BasesfAdminDashActions.class.php');

/**
 * sfAdminDash actions.
 *
 * @package    plugins
 * @subpackage sfAdminDash
 * @author     kevin
 * @version    SVN: $Id: actions.class.php 25203 2009-12-10 16:50:26Z Crafty_Shadow $
 */
class sfAdminDashActions extends BasesfAdminDashActions {

    public function executeGlobal_filter(sfWebRequest $request) {
        $this->form = new globalFilterForm();
        if ($request->isMethod(sfWebRequest::POST)) {

            $data = $request->getParameter('global_filter');

            if ($request->hasParameter('archive'))
                $this->getUser()->setAttribute('kts_global_program_filter', false);
            else
                $this->getUser()->setAttribute('kts_global_program_filter', $data);

            $this->redirect('@homepage');
        }
    }

}